<template>
	<view class="container">
		<view class="content">
			<z-paging ref="paging" v-model="dataList" use-page-scroll :auto-show-back-to-top="true"
				:showRefresherUpdateTime="true" @query="queryList">
				<view class="jilu">
					<text class="jilu2">{{$t('licai.shijian')}}</text>
					<text class="jilu1">{{$t('licai.shulian')}}</text>
					<text class="jilu1">{{$t('kuan.yishifang')}}</text>
					<text class="jilu1">{{$t('kuan.weishifang')}}</text>
					<text class="jilu1">{{$t('licai.zhuangtai')}}</text>
				</view>
				<view class="jilu" v-for="(item,index) in dataList">
					<text class="jilu2">{{item.datetime}}</text>
					<text class="jilu1">{{item.money}}</text>
					<text class="jilu1">{{item.sf_money}}</text>
					<text class="jilu1">{{item.wsf_money}}</text>
					<text  class="jilu1"v-if="item.state==1">{{$t('kuan.shifangzhong')}}</text>
					<text  class="jilu-state"v-else >{{$t('kuan.yiwangcheng')}}</text>
				</view>
			
			</z-paging> 
		</view>
	</view>
</template>

<script>
	import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin'
	export default {
		mixins: [ZPMixin],
		data() {
			return {
			dataList:[]
			}
		},
		onLoad() {
		uni.setNavigationBarTitle({
		  title:  this.$t('kuan.touzhijilu'), // 必填，页面标题）
		 })		
		},
		methods: {
			// 列表
			queryList(pageNo, pageSize) {
				let data = {
					yema:pageNo,
					yezhi:pageSize
				}
				let opts = {
					url: '/order/Getlicailist',
					method: 'GET'
				};
				this.api.httpTokenRequest(opts, data).then(res => {
					// console.log('投资列表', res);
					if (res[1].data.state == 'success') {
						this.$refs.paging.complete(res[1].data.list)
							
					}
							
				})
				
				
			},
		},
	}
</script>

<style>
	.container{
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	.content{
		width: 690rpx;
		padding: 20rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		border-radius: 10rpx;
		background-color: #1b2587;
		border: 1rpx solid #cee8fc;
		box-shadow: inset 5px 5px 10px #1b2587,
			inset -5px -5px 10px #cee8fc;
	}
	.jilu{
		width: 660rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		margin-top: 30rpx;
		padding-bottom: 30rpx;
		border-bottom: 1rpx solid #e4eefd;
	}
	.jilu2{
		width: 130rpx;
		font-size: 12px;
	}
	.jilu1{
		width: 100rpx;
		font-size: 12px;
	}
	.jilu-state{
		width: 100rpx;
		font-size: 12px;
		color: #f00;
	}
</style>